package com.huawei.zyb.taskManager.domain.developer.valueobject;

/**
 * 开发者状态枚举值对象
 */
public enum DeveloperStatus {
    ACTIVE("活跃"),
    BUSY("忙碌"),
    ON_LEAVE("请假"),
    INACTIVE("非活跃");

    private final String description;

    DeveloperStatus(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    /**
     * 检查是否可以分配任务
     */
    public boolean canBeAssignedTasks() {
        return this == ACTIVE || this == BUSY;
    }

    /**
     * 检查是否为可用状态
     */
    public boolean isAvailable() {
        return this == ACTIVE;
    }

    /**
     * 检查是否为忙碌状态
     */
    public boolean isBusy() {
        return this == BUSY;
    }

    /**
     * 检查是否在请假
     */
    public boolean isOnLeave() {
        return this == ON_LEAVE;
    }

    /**
     * 检查是否为非活跃状态
     */
    public boolean isInactive() {
        return this == INACTIVE;
    }
}